package com.hou.postgresql.blog.entity.po;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.time.LocalTime;
import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.google.common.collect.Range;
import com.hou.postgresql.handler.ArrayTypeHandler;
import com.hou.postgresql.handler.JsonTypeHandler;
import lombok.Data;
import org.apache.ibatis.type.Alias;
import org.apache.ibatis.type.JdbcType;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author 侯征
 * @since 2020-05-22
 */
@Data
@Alias("blogUser")
@TableName(autoResultMap = true)
public class BlogUser implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    private String name;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    private Integer version;

    @TableField(typeHandler= JsonTypeHandler.class)
    private Map<String,Object> relation;

    @TableField(typeHandler= ArrayTypeHandler.class)
    private List<String> fans;

    private LocalDate birthday;

    private BigDecimal points;

    @DateTimeFormat(pattern = "HH:mm")
    private LocalTime loginTime;

    private String writeInterval;

    @TableField(typeHandler= ArrayTypeHandler.class)
    private List<Long> numbers;

    private Boolean adult;

    private String address;

    private String weight;

}
